-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUI race condition fix #1101
RUI race condition fix #1101
Conversation
filterNulls(), | ||
tap(reg => this.editRegistration(reg as SpatialEntityJsonLd)) | ||
).subscribe(); | ||
this.refData.getSourceDB().subscribe(db => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may cause the database to be loaded twice. Instead listen to the refData state (or part of it) and then subscribe to that.
tap(reg => this.editRegistration(reg as SpatialEntityJsonLd)) | ||
).subscribe(); | ||
this.refData.getSourceDB().subscribe(db => { | ||
this.refData.setState(db); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already done in the reference data state
Kudos, SonarCloud Quality Gate passed! |
Made a fix to resolve the race condition issue in #1089
The unwanted registration popup issue comes up when there is a large delay between DOMContentLoaded and populating the values in the ccf-rui element. The workaround for now is to inject the element after updating the values (see webcomponent-async-inject-example.html).